package com.rightsidetech.mall.dto.request;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotEmpty;
import java.io.Serializable;
import java.util.List;

@Data
public class DetailSpecsReq implements Serializable {

    @ApiModelProperty(value = "规格条码",required = true)
    @NotBlank(message = "规格条码不允许为空")
    @Length(min = 3,max = 3,message = "规格条码必须为三位数字")
    private String code;

    @ApiModelProperty(value = "规格明细对应的规格名",required = true)
    @NotEmpty(message = "规格名不允许为空")
    private List<DetailSpecsNameReq> nameList;

    @ApiModelProperty(value = "规格明细对应的规格值",required = true)
    @NotEmpty(message = "规格值不允许为空")
    private List<DetailSpecsValueReq> valueList;
}
